package cn.secby.pay.service.impl;
import cn.secby.common.core.web.mapper.WrapperParse;
import java.util.List;
import cn.secby.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.secby.pay.mapper.RefundRecordMapper;
import cn.secby.pay.domain.RefundRecord;
import cn.secby.pay.service.IRefundRecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Arrays;

/**
 * 退款记录Service业务层处理
 * @author shenkunlin
 * @date 2025-05-08
 */
@Service
public class RefundRecordServiceImpl extends ServiceImpl<RefundRecordMapper, RefundRecord> implements IRefundRecordService
{
    @Autowired
    private RefundRecordMapper refundRecordMapper;

    /**
     * 查询退款记录
     * @param id 退款记录主键
     * @return 退款记录
     */
    @Override
    public RefundRecord selectRefundRecordById(Long id)
    {
        return getById(id);
    }

    /**
     * 查询退款记录列表
     * @param refundRecord 退款记录
     * @return 退款记录
     */
    @Override
    public List<RefundRecord> selectRefundRecordList(RefundRecord refundRecord)
    {
        return list(WrapperParse.query(refundRecord));
    }

    /**
     * 新增退款记录
     * @param refundRecord 退款记录
     * @return 结果
     */
    @Override
    public Boolean insertRefundRecord(RefundRecord refundRecord)
    {
        return save(refundRecord);
    }

    /**
     * 修改退款记录
     * @param refundRecord 退款记录
     * @return 结果
     */
    @Override
    public Boolean updateRefundRecord(RefundRecord refundRecord)
    {
        return updateById(refundRecord);
    }

    /**
     * 批量删除退款记录
     * @param ids 需要删除的退款记录主键
     * @return 结果
     */
    @Override
    public Boolean deleteRefundRecordByIds(List<Long> ids)
    {
        return removeByIds(ids);
    }

    /**
     * 删除退款记录信息
     * @param id 退款记录主键
     * @return 结果
     */
    @Override
    public Boolean deleteRefundRecordById(Long id)
    {
        return removeById(id);
    }
}
